home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / basics / alwayspreview / sample components / samplecode.r < prev    next >
Encoding:
Text File  |  2000-09-28  |  3.3 KB  |  223 lines

  1. /*
  2.     File:        SampleCode.r
  3.  
  4.     Contains:    
  5.  
  6.     Written by: Peter Hoddie    
  7.  
  8.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/28/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. #include "Types.r"
  25.  
  26. #define SystemSevenOrLater
  27.  
  28. type 'thng' {
  29.     hex longint    type;
  30.     hex longint    subType;
  31.     hex longint    manufacturer;
  32.     hex    longint    flags;
  33.     hex    longint flagsMask;
  34.     hex longint    thingResType;    
  35.     int thingResID;
  36.     hex longint  thingNameResType;
  37.     int thingNameResID;
  38.     hex longint  thingInfoResType;
  39.     int thingInfoResID;
  40.     hex longint  thingIconResType;
  41.     int thingIconResID;
  42. };
  43.  
  44. #define    canMovieImportHandles 1
  45. #define    canMovieImportFiles 2
  46. #define    hasMovieImportUserInterface 4
  47. #define    canMovieExportHandles 8
  48. #define    canMovieExportFiles 16
  49. #define    hasMovieExportUserInterface 32
  50. #define    dontAutoFileMovieImport 64
  51.  
  52. #define mediaHandlerFlagBaseClient 1
  53.  
  54. #define pnotComponentWantsEvents 1
  55. #define pnotComponentNeedsNoCache 2
  56.  
  57.  
  58. resource 'thng' (128,  "Pict Media Handler") {
  59.     'mhlr',
  60.     'PICT',
  61.     'appl',
  62.     mediaHandlerFlagBaseClient,
  63.     0,
  64.     'mhlr',
  65.     128,
  66.     'STR ',
  67.     128,
  68.     'STR ',
  69.     228,
  70.     0,
  71.     0
  72. };
  73.  
  74. resource 'STR ' (128) {
  75.     "PICT Media Handler"
  76. };
  77.  
  78. resource 'STR ' (228) {
  79.     "Plays PICTs in QuickTime movies"
  80. };
  81.  
  82. resource 'thng' (129,  "SGChannel Pict") {
  83.     'sgch',
  84.     'PICT',
  85.     'appl',
  86.     0,
  87.     0,
  88.     'sgch',
  89.     128,
  90.     'STR ',
  91.     129,
  92.     'STR ',
  93.     229,
  94.     0,
  95.     0
  96. };
  97.  
  98. resource 'STR ' (129) {
  99.     "SGChannel PICT"
  100. };
  101.  
  102. resource 'STR ' (229) {
  103.     "Captures PICTs from screen into QuickTime movies"
  104. };
  105.  
  106. resource 'thng' (130,  "SGPictPanel") {
  107.     'sgpn',
  108.     'PICT',
  109.     'thng',
  110.     0,
  111.     0,
  112.     'sgpn',
  113.     128,
  114.     'STR ',
  115.     130,
  116.     'STR ',
  117.     230,
  118.     0,
  119.     0
  120. };
  121.  
  122. resource 'STR ' (130) {
  123.     "Settings"
  124. };
  125.  
  126. resource 'STR ' (230) {
  127.     "Configure PICT capture channel"
  128. };
  129.  
  130. resource 'thng' (131,  "Export PICS") {
  131.     'spit',
  132.     'PICS',
  133.     0,
  134.     canMovieExportFiles,
  135.     0,
  136.     'eat ',
  137.     128,
  138.     'STR ',
  139.     131,
  140.     'STR ',
  141.     231,
  142.     0,
  143.     0
  144. };
  145.  
  146. resource 'STR ' (131) {
  147.     "PICS"
  148. };
  149.  
  150. resource 'STR ' (231) {
  151.     "Exports QuickTime movies as PICS files"
  152. };
  153.  
  154. resource 'thng' (132,  "ImportScrapbook") {
  155.     'eat ',
  156.     'scbk',
  157.     'PICT',
  158.     canMovieImportFiles,
  159.     0,
  160.     'eat ',
  161.     129,
  162.     'STR ',
  163.     132,
  164.     'STR ',
  165.     232,
  166.     0,
  167.     0
  168. };
  169.  
  170. resource 'STR ' (132) {
  171.     "Scrapbook"
  172. };
  173.  
  174. resource 'STR ' (232) {
  175.     "Import Scrapbook files into QuickTime movies"
  176. };
  177.  
  178. resource 'thng' (133,  "PreviewPICS") {
  179.     'pnot',
  180.     'PICS',
  181.     'appl',
  182.     pnotComponentNeedsNoCache,
  183.     0,
  184.     'pnot',
  185.     128,
  186.     'STR ',
  187.     133,
  188.     'STR ',
  189.     233,
  190.     0,
  191.     0
  192. };
  193.  
  194. resource 'STR ' (133) {
  195.     "Preview PICS"
  196. };
  197.  
  198. resource 'STR ' (233) {
  199.     "Preview PICS files"
  200. };
  201.  
  202. resource 'DITL' (7000, "Pict Channel Panel") {
  203.     {    /* array DITLarray: 1 elements */
  204.         /* [1] */
  205.         {4, 6, 90, 143},
  206.         UserItem {
  207.             disabled
  208.         }
  209.     }
  210. };
  211.  
  212. resource 'DITL' (7001, "Pict Panel") {
  213.     {    /* array DITLarray: 1 elements */
  214.         /* [1] */
  215.         {11, 15, 31, 132},
  216.         CheckBox {
  217.             enabled,
  218.             "Capture Ticks"
  219.         }
  220.     }
  221. };
  222.  
  223.